import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

class WebPage extends StatelessWidget {
  final String loadUrl;
  final String? title;
  final WebViewController controller = WebViewController()
    ..setJavaScriptMode(JavaScriptMode.unrestricted)
    ..setBackgroundColor(const Color(0x00000000));

  WebPage({super.key, required this.loadUrl, this.title});

  @override
  Widget build(BuildContext context) {
    controller.loadRequest(Uri.parse(loadUrl));
    return WebViewWidget(controller: controller);
  }
}
